package com.atguigu.lease.web.admin.service.impl;

import com.atguigu.lease.model.entity.AttrKey;
import com.atguigu.lease.web.admin.mapper.AttrKeyMapper;
import com.atguigu.lease.web.admin.service.AttrKeyService;
import com.atguigu.lease.web.admin.vo.attr.AttrKeyVo;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author liubo
* @description 针对表【attr_key(房间基本属性表)】的数据库操作Service实现
* @createDate 2023-07-24 15:48:00
*/
@Service
public class AttrKeyServiceImpl extends ServiceImpl<AttrKeyMapper, AttrKey>
    implements AttrKeyService{
    // 爆红是因为 Mapper对象是通过动态代理获得的, 在代码运行之前没有 Mapper对象,无法识别.
    @Autowired
    private AttrKeyMapper attrKeyMapper;    //爆红但是运行正常 QAQ


    @Override
    public List<AttrKeyVo> attributeKeyAndValue() {
        List<AttrKeyVo> list =  attrKeyMapper.queryAttrKeyAndValue();
        System.out.println("list = " + list);
        return list;
    }
}




